package cc.realxyq.demo.tx;

import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author kwhan
 * @date 2022年01月10日 23:37
 */
@Slf4j
@Service
public class UserService {

    @Transactional(rollbackFor = Exception.class)
    public void  list(){
        log.info("查询成功");
    }
}
